package com.zzxy.spring3.service.impl;
import com.zzxy.spring3.dao.IStudentDao;
import com.zzxy.spring3.dao.impl.StudentDaoImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.zzxy.spring3.po.Override;

@Service("stuService")
public class StudentServiceimpl implements IStudentService {
    @Autowired
    private IStudentDao studentDao;

    /* public IStudentDao getStudentDao() {
         return studentDao;
     }

     public void setStudentDao(IStudentDao studentDao) {
         this.studentDao = studentDao;}*/
    @Override
    public void addStudent(String username, String password) {
        //dao
        studentDao.addStuden(username, password);

    }

    @Override
    public int updateStudent(int id) {
        System.out.println("update student...");
        int i = 1 / 0;
        return id;

    }

    @Override
    public void deleteStudent(int id) {
        System.out.println("delete student...");
    }
    // * com.zzxy.spring.service..*.*(..)
    // * * (..)
    /* com
         zzxy
            spring34
                mall
                   admin
                         service
                   app
                         service
        com.zzxy.spring34.mall.*.service.*/


    public void setStudentDao(StudentDaoImpl studentDao) {
    }
}